// .vuepress/config.js
const moment = require('moment');
// const footer = require("./footer");

module.exports = {
    //配置：https://vuepress.vuejs.org/zh/config/
    title : "Yuuki与Mio的代码工坊",
    description : "一个基于vuepress搭建的文档平台",
    head: [
        ['link', { rel: 'icon', href: '/assets/img/vue.png' }],
        ['meta', { name: 'author', content: 'Yuuki(陈钱) 与 Mio(黄鑫远)' }],
        ['meta', { name: 'keywords', content: '建站 vuepress 阿里云服务器 前端 后端 JavaWeb' }],
        ['link', { rel: 'manifest', href: '/manifest.json' }],
        ['meta', { name: 'theme-color', content: '#3eaf7c' }],
        ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
        ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
        ['link', { rel: 'apple-touch-icon', href: '/images/icons/icon-152x152.png' }],
        ['meta', { name: 'msapplication-TileImage', content: '/images/icons/icon-144x144.png' }],
        ['meta', { name: 'msapplication-TileColor', content: '#000000' }]
    ],

    //值得注意的是，下面全部都是主题配置https://vuepress.vuejs.org/zh/theme/default-theme-config.html
    themeConfig: {
        logo: '/assets/img/vue.png',//logo
        navbar: true,//设置为false时则不显示导航栏
        nav: [
            { text: 'Home', link: '/' },
            { text: 'Python', link: '/python/' },
            { text: '前端', link: '/front/' },
            { text: 'google链接', link: 'https://google.com' ,target:'_blank', rel:''},//对于要跳转的
            {
                text: '关于我',
                ariaLabel: 'About me',
                items: [
                    { text: 'Gitee', link: '/language/chinese/' },
                    { text: 'Github', link: '/language/japanese/' },
                    { text: 'Website', link: '/language/japanese/' }
                ]
            },//对于多级嵌套的

        ],
        //侧边栏sidebar
        sidebar: 'auto',
        lastUpdated: 'Last Updated',//显示最后更新时间

    },
    //插件
    plugins: [
        [
            '@vuepress/last-updated',
            {
                transformer: (timestamp, lang) => {
                    // 不要忘了安装 moment
                    const moment = require('moment')
                    moment.locale("zh-cn")
                    //你应该在moment.js里面找到如何格式化时间戳的方法：https://momentjs.cn/docs/#/parsing/string-format/
                    return moment(timestamp).format("LLLL")
                }
            }
        ],
        [
            '@vuepress/pwa',
            {
              serviceWorker: true,
              updatePopup: {
                message: "新的风暴已经出现~",
                    buttonText: "刷新"
              }
            }
        ]
    ],
    //底边栏
    footer: {
        friendLinks: [
            {
                label: "站长 - Yuuki",
                // icon: "/icon/user.svg",
                href: "https://github.com/",
            },
            {
                label: "站长 - Mio",
                href: "https://github.com/huang-chip/huang-chip.github.io",
            },
            {
                label: "老鱼简历",
                href: "https://www.laoyujianli.com/",
            },
            {
                label: "鱼聪明 AI",
                href: "https://www.yucongming.com/",
            },
            {
                label: "编程学习圈",
                href: "https://yuyuanweb.feishu.cn/wiki/VC1qwmX9diCBK3kidyec74vFnde",
            },
        ],
        copyright: {
            href: "https://beian.miit.gov.cn/",
            name: "沪ICP备19026706号-6",
        },
    }
}
